For conventional reprogramming, a Personal Computer (PC) as a writing tool is connected via a low-speed CAN (Controller Area Network) to an in-vehicle control device (ECU: Engine Control Unit), and a load module (new program) is written to a flash memory of the ECU while dividing and transferring the load module.
Even when the update part for the new program is small with respect to the old program is small, the entire new program is transferred via the CAN and the entire new program is written.
Therefore, there is a problem that writing takes time. On the other hand, an idea of differential reprogramming has been conventionally proposed (see, for example, PTL 1). That is, in paragraph [0019] of PTL 1, “means for creating differential data between old and new programs in block units” is described as a way of rewriting. In addition, in paragraph [0064], a block to be updated of the old program is transferred to an SDRAM, the new program is restored to the SDRAM by using the differential data and the old program, the block to be updated is erased, and the new program is then written.
PTL 2 describes, in paragraph [0006], means for achieving differential update using a small amount of RAM. Instead of transferring a block to be updated o the old program to a RAM, the block is transferred to another block of the flash memory. That is, the block to be updated is erased after transferring the old program, the new program is restored using the differential data and the transferred old program, and the new program is written to the block to be updated. By repeating this processing for all blocks to be updated, the new program can be written to the flash memory. However, when there is a new program to be written to another block, the conventional update using full-text data is performed since the old program has already been erased.
In this way, a technique for realizing differential reprogramming even using a small amount of RAM has been developed.